package com.well.register.console.domain;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * <p>
 * server model
 * </p>
 *
 * @author weedo
 * @since 2022/8/10
 */
@Data
@TableName("well_server")
public class ServerModel {

    @TableId
    private Integer id;

    private String namespace;

    @TableField("well_group")
    private String wellGroup;

    private String servername;

    @TableField("server_ip")
    private String serverIp;

    @TableField("server_port")
    private Integer serverPort;

    /* 该值由用户分配，并且再服务连接时做校验。*/
    private String accesskey;

    @TableField("run_type")
    private Integer runType;

    @TableField("create_time")
    private Date createTime;

    @TableField("update_time")
    private Date updateTime = new Date();

    @TableField("well_id")
    private Integer wellId;

    @TableField(value = "remote_address", updateStrategy = FieldStrategy.IGNORED)
    private String remoteAddress;

}
